package com.zx.ext.service.Impl;

import com.zx.ext.dao.BookDao;
import com.zx.ext.entity.Books;
import com.zx.ext.service.BookServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 图书管理业务逻辑层实现类
 */
@Service
public class BookServiceImpl implements BookServices {

    @Autowired
    private BookDao bookDao;


    @Override
    public int addBook(Books books) {
        return bookDao.addBook(books);
    }

    @Override
    public List<Books> queryBooks() {
        return bookDao.queryBooks();
    }

    @Override
    public int updateBook(Books book) {
        return bookDao.updateBook(book);
    }

    @Override
    public int delBook(int bookId) {
        return bookDao.delBook(bookId);
    }
}
